module.exports = app => {
    const { router, controller } = app;
    const va = app.middleware.user.validateAdmin();
    // 文章添加
    router.post('/article/add', va, controller.content.articleAdd);

    // 后台获取文章列表
    router.get('/article/list', va, controller.content.articleList);

    // 前台获取文章列表
    router.get('/article/list/:status', controller.content.specificArticle);

    // 获取具体的文章内容
    router.get('/article/detail/:articleId', controller.content.articleDetail);

    // 修改文章状态
    router.post('/article/status/:articleId?', va, controller.content.articleStatus);

    // 编辑文章
    router.post('/article/update/:articleId?', va, controller.content.aritcleUpdate);

    // 文章删除
    router.get('/article/delete/:articleId?', va, controller.content.articleDelte);

    // 删除文章预览图
    router.get('/article/delPreview/:articleId?', va, controller.content.articleDelPreview);
};